home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Snippets / CustomDialog Demo / Headers / EventHandler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-31  |  1.7 KB  |  57 lines  |  [TEXT/MMCC]

  1. /**********************************************************************
  2.  *
  3.  *                        CustomGetFile Dialog Demo
  4.  *
  5.  *    EventHandler.h
  6.  *
  7.  *    Written in CodeWarrior Gold 5.5
  8.  *    August 31, 1995
  9.  *
  10.  *    Copyright © 1995 Carl B. Constantine
  11.  *    Some portions Copyright © 1995 MetroWerks, Inc.
  12.  *    Some portions Copyright © 1995 Apple Computer, Inc.
  13.  *
  14.  **********************************************************************/
  15.  
  16.  /*------------------------------------------------------------------
  17.   #
  18.   #                            File History
  19.   #
  20.   #        Date                Description of Change
  21.   #        ----                ---------------------
  22.   #        Aug 31/93            — Original creation of file
  23.   #
  24.   #
  25.   #
  26.   -------------------------------------------------------------------*/
  27.  
  28. #pragma once
  29.  
  30. #define LAST_HANDLER            3            /* Number of Apple Event handlers - 1 */
  31.  
  32.  
  33. struct AEinstalls
  34.     {
  35.     AEEventClass theClass;
  36.     AEEventID theEvent;
  37.     AEEventHandlerProcPtr theProc;
  38.     };
  39. typedef struct AEinstalls AEinstalls;
  40.  
  41.  
  42.  
  43. void EventLoop( void );
  44. void DoEvent( EventRecord *event );
  45. void DoOSEvent( EventRecord *event );
  46. void DoMenuCommand( long menuResult );
  47. void AdjustMenus( void );
  48. void DoKeyPress( WindowPtr wp, EventRecord *event );
  49.  
  50. Boolean Init_AE_Events( void );                /* High level Apple Events */
  51. void Do_High_Level( EventRecord *AERecord );
  52. pascal OSErr Core_AE_Open_Handler( AppleEvent *messagein, AppleEvent *reply, long refIn ); /* Handlers */
  53. pascal OSErr Core_AE_OpenDoc_Handler( AppleEvent *messagein, AppleEvent *reply, long refIn );
  54. pascal OSErr Core_AE_Print_Handler( AppleEvent *messagein, AppleEvent *reply, long refIn );
  55. pascal OSErr Core_AE_Quit_Handler( AppleEvent *messagein, AppleEvent *reply, long refIn );
  56.  
  57. /*============================= End of File ==============================*/